<!--
 * @Description: 企业端设置主页
 * @version: 电子名片2.0
 * @Author: 付小清
 * @Date: 2020-10-30 14:26:08
 * @LastEditors: 付小清
 * @LastEditTime: 2020-12-16 10:20:02
-->

<template>
  <div class="mainbox">
    <div class="table-box">
      <el-tabs v-model="tabVal" @tab-click="tabClick">
        <el-tab-pane v-for="( item, index ) in tabList" :key="index" :label="item.label" :name="item.value">
          <Business v-if="tabVal == 'business'" />
          <Position v-else-if="tabVal == 'position'" />
          <BusinessTag v-if="item.value == 'BusinessTag'" />
          <CertificationLetter v-else-if="item.value == 'CertificationLetter'" />
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script>
// 组件引入
import BusinessTag from './EnterpriseSet/BusinessTag'
import CertificationLetter from './EnterpriseSet/CertificationLetter'
import Business from './GeneralSet/Business'
import Position from './GeneralSet/Position'
export default {
  components: {
    Business,
    Position,
    // eslint-disable-next-line vue/no-unused-components
    BusinessTag,
    CertificationLetter
  },
  data() {
    return {
      tabVal: 'CertificationLetter',
      tabList: [
        { label: '组织认证设置', value: 'CertificationLetter' },
        { label: '业务标签设置', value: 'BusinessTag' },
        { label: '行业设置', value: 'business' },
        { label: '职位设置', value: 'position' },
      ]
    }
  },
  mounted() {

  },
  methods: {
    tabClick(e) {
      console.log(e)
    }
  }
}
</script>

